package com.hwadee.teachingprocessmanagementsystem.dto.student;

import com.hwadee.teachingprocessmanagementsystem.dto.DepartmentDto;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @Description:
 * @Author: Jukomu
 * @Package: com.hwadee.teachingprocessmanagementsystem.dto.student
 * @Project: TeachingProcessManagementSystem
 * @name: StudentCourseStandard
 * @Date: 2024/7/14-20:02
 * @Filename: StudentCourseStandard
 */
@Data
public class StudentCourseStandardDto implements Serializable {
    // 系部dto，存储所有系部名称列表
    private DepartmentDto departmentDto;
    // 展示列表
    private List<StudentCourseStandard> studentCourseStandardList;

    public void addStudentCourseStandard(StudentCourseStandard studentCourseStandard) {
        if (this.studentCourseStandardList == null) {
            this.studentCourseStandardList = new ArrayList<StudentCourseStandard>();
        }
        this.studentCourseStandardList.add(studentCourseStandard);
    }

    public void addStudentCourseStandard(String departmentName, String courseId, String courseName, Integer courseHour, Integer credits, String type) {
        StudentCourseStandard studentCourseStandard = new StudentCourseStandard();
        studentCourseStandard.setDepartmentName(departmentName);
        studentCourseStandard.setCourseId(courseId);
        studentCourseStandard.setCourseName(courseName);
        studentCourseStandard.setCourseHour(courseHour);
        studentCourseStandard.setCredits(credits);
        studentCourseStandard.setType(type);
        this.addStudentCourseStandard(studentCourseStandard);
    }

    /**
     * 获取学生课程标准的一条记录
     * @return
     */
    public StudentCourseStandard getStudentCourseStandard() {
        return new StudentCourseStandard();
    }
}

/**
 * 学生课程标准显示列表
 */
@Data
class StudentCourseStandard implements Serializable{
    // 开课单位
    private String departmentName;
    // 课程编号
    private String courseId;
    // 课程名称
    private String courseName;
    // 总学时
    private Integer courseHour;
    // 学分
    private Integer credits;
    // 课程类别
    private String type;
}
